#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
int x = 0;

int main()
{
    pid_t id = fork();

    if (0 == id)
    {
        x += 10;
        printf("this is a child_process, pid : %d\n", getpid());
        printf("x = %d, &x = %p\n", x, &x);
        printf("------------------------------------------\n");
    }
    else 
    {
        printf("this is a father_process, pid : %d\n", getpid());
        printf("x = %d, &x = %p\n", x, &x);
        printf("------------------------------------------\n");
    }
    return 0;
}